const express = require('express');
const router = express.Router();
const eventController = require('../controllers/eventController');
const authenticate = require('../middleware/auth');

// 创建事件 (需要认证)
router.post('/', authenticate, eventController.createEvent);

// 获取用户的所有事件 (需要认证)
router.get('/user/:userId', authenticate, eventController.getUserEvents);

// 根据类型获取用户事件 (需要认证)
router.get('/user/:userId/type/:type', authenticate, eventController.getUserEventsByType);

module.exports = router;